package com.fiidee.blog.common;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 瑱彬 on 2015/5/27.
 */
public class ERRORCODE {

    public static int SUCCESS = 200;

    public static int NOTFOUND = 404;

    public static int NOUSER = 10001;
    public static int PASSWORDWRONG = 10002;
    public static int NOLOGIN = 10003;
    public static int NOPERMISSION = 10004;
    public static int UPDATEUSERERROR = 10005;

    public static int INSERTERROR = 11001;
    public static int UPDATEERROR = 11002;
    public static Map<Integer,String> ERRORMSG = new HashMap<>();
    static {
        ERRORMSG.put(SUCCESS,"执行成功");
        ERRORMSG.put(NOTFOUND,"没有找到");
        ERRORMSG.put(NOUSER,"没有找到用户");
        ERRORMSG.put(PASSWORDWRONG,"密码错误");
        ERRORMSG.put(UPDATEUSERERROR,"更新出错");
        ERRORMSG.put(INSERTERROR,"插入文章出错");
        ERRORMSG.put(UPDATEERROR,"更新文章出错");
        ERRORMSG.put(NOLOGIN,"然而，并没有没有登录");
        ERRORMSG.put(NOPERMISSION,"没有操作权限");
    }
}
